/*
 * @Author: your name
 * @Date: 2022-02-03 14:56:06
 * @LastEditTime: 2022-02-03 15:53:59
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \vue3-vite-tsx\src\components\loading\src\loading.tsx
 */
import { defineComponent } from 'vue'

import style from './loading.module.less'
import './loading.module.less'

export default defineComponent({
  props: {
    options: {
      type: Object,
      default: () => ({
        show: false
      })
    }
  },
  setup(props) {
    return () => (
      <>
        {props.options.show ? (
          <div class={style['c-loading']}>
            <span class={style.text}>加载中...</span>
          </div>
        ) : (
          ''
        )}
      </>
    )
  }
})
